<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
use App\Middleware\DecryptMiddleware;


Router::addRoute(['GET', 'POST', 'HEAD'], '/test', 'App\Controller\IndexController@index',['middleware' => [\App\Middleware\DecryptMiddleware::class]]);
Router::addRoute(['GET', 'POST', 'HEAD'], '/advert', 'App\Controller\AdvertController@index',['middleware' => [\App\Middleware\DecryptMiddleware::class]]);
//Router::post("/advert",'App\Controller\AdvertController@index');

Router::addGroup(
    '/v1', function () {
    Router::post("/advert",'App\Controller\AdvertController@index');
},
    ['middleware' => [DeCryptMiddleware::class]]
);



Router::get('/favicon.ico', function () {
    return '';
});
